<?php 
if($list)
{
	foreach($list as $book)
	{
?>
<div class="book">
	<div class="left">
		<?php echo $book['title']; ?>
		<div class="addit">字节数:<?php echo $book['length']; ?> - 添加时间:<?php echo date('Y/m/d H:m', $book['addtime']); ?></div>
	</div>
	<div class="right">
		<a href="<?php echo url('user-editbook/id/'.$book['book_id']);?>">编辑</a>
		<a href="javascript:;" onclick="cfmdel(<?php echo $book['book_id'];?>)">删除</a>
	</div>
</div>
<script>
function cfmdel(bookid)
{
	if(confirm('确认删除此书籍？')){
		location.href="<?php echo url('user-dropbook/id/BOOKID');?>".replace('BOOKID',bookid);
	}
}
</script>
<?php 
	}
}
?>